package com.junqson.je.content.controller;

import com.junqson.je.common.annotation.LoginRequire;
import com.junqson.je.common.model.ApiResult;
import com.junqson.je.content.service.FileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Descriptions
 * @Company
 * @Author Junqson
 * @Date 2020/2/2 23:19
 * @Version 1.0
 */
@RestController
@RequestMapping("file")
public class FileController {

    @Autowired
    private FileService fileService;

    @RequestMapping("upload")
    public ApiResult uploadFile(MultipartFile file) {
        return fileService.upload(file);
    }

}
